package com.wn.controller;

import com.wn.bean.House;
import com.wn.service.HouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yellow Docter
 * @date 2022 -07-14
 * @desc
 */
@RestController
@RequestMapping("house")
public class HouseController {

    @Autowired
    private HouseService houseService;

    @GetMapping
    public List<House> findAll(){
        return  houseService.findList();
    }
}
